/*
 * OREKIT-X
 * Copyright 2002-2008 CS Communication & Systemes
 * 
 * Parts of this software package have been licensed to CS
 * Communication & Systemes (CS) under one or more contributor license
 * agreements.  See the NOTICE file distributed with this work for
 * additional information.
 *  
 * This is an experimental copy of OREKIT from www.orekit.org.
 * Please use the original OREKIT from orekit.org for normal work
 * unrelated to this research project.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you
 * may not use this file except in compliance with the License.  You
 * may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied.  See the License for the specific language governing
 * permissions and limitations under the License.
 */
package ore;

import org.apache.commons.math.geometry.Rotation;
import org.apache.commons.math.geometry.Vector3D;


/**
 * This class represents the rotation between a reference frame and
 * the satellite frame, as well as the spin of the satellite (axis and
 * rotation rate).
 * 
 * An instance {@link Attitude} is immutable.
 * 
 * @see     ore.Orbit
 * @author V&eacute;ronique Pommier-Maurussane
 */
public class Attitude 
    extends Object
    implements java.io.Serializable
{


    private final Frame referenceFrame;

    private final Rotation attitude;

    private final Vector3D spin;


    /** 
     * @param referenceFrame Frame from which attitude is defined
     * @param attitude Rotation between reference frame and satellite frame
     * @param spin Axis and velocity, in satellite frame
     */
    public Attitude(final Frame referenceFrame, final Rotation attitude, final Vector3D spin) {
        super();
        this.referenceFrame = referenceFrame;
        this.attitude       = attitude;
        this.spin           = spin;
    }


    public Frame getReferenceFrame() {
        return referenceFrame;
    }
    public Rotation getRotation() {
        return attitude;
    }
    public Vector3D getSpin() {
        return spin;
    }

}
